<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>

<%@ Page Language="c#" Inherits="PHSRAG.Insight21.Admin.AdminUserAccessRights" CodeFile="AdminUserAccessRights.aspx.cs" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>AdminUserAccessRights</title>
	<link href="../Insight21.css" type="text/css" rel="stylesheet" />

	<script type="text/jscript" language='jscript'>
			var warn = false; 			
			function ExitWarning()
			{	if(warn == true)
				{
					if(document.getElementById("lastName").className == 'alert')
					{
						event.returnValue = "Make sure to save any work before leaving this page.";
						warn = false;
					}
					else 
						return; 
				}
				else 
					return; 						
			}
	</script>

</head>
<body id="bodyTag" runat="server">
	<form id="AdminUserAccessRightsForm" method="post" runat="server">
		<table class="Container">
			<tr>
				<td>
					<table class="Header" width="100%">
						<tr>
							<td>
								<cc1:Header ID="header" runat="server" OnNavigate="OnHeaderNavigate" />
							</td>
						</tr>
						<tr>
							<td>
								<cc1:AdminUserManagementSubNavigation ID="adminUserManagementSubNavigation" runat="server"
									OnNavigate="OnSubNavigationNavigate" />
							</td>
						</tr>
					</table>
					<cc2:BreadCrumb ID="breadCrumb" runat="server" OnNavigate="OnHeaderNavigate" />
					<table class="Invisible" id="dynamicTable" cellspacing="10">
						<tr>
							<td>
								<cc2:ActivityIndicator ContainerID="dynamicTable" ID="activityIndicator" runat="server">
								</cc2:ActivityIndicator>
							</td>
						</tr>
						<tr>
							<td>
								<cc2:Annunciator ContainerID="dynamicTable" ID="annunciator" runat="server"></cc2:Annunciator>
							</td>
						</tr>
					</table>
					<table>
						<tr>
							<td class="Label" align="right">
								Last Name:&nbsp;</td>
							<td class="LabelWithBorder" colspan="3">
								<asp:Label ID="lastName" runat="server"></asp:Label></td>
						</tr>
						<tr>
							<td class="Label" align="right">
								First Name:&nbsp;</td>
							<td class="LabelWithBorder" colspan="3">
								<asp:Label ID="firstName" runat="server"></asp:Label></td>
						</tr>
						<tr>
							<td class="Label" align="right">
								Username:&nbsp;</td>
							<td class="LabelWithBorder" colspan="3">
								<asp:Label ID="userName" runat="server"></asp:Label></td>
						</tr>
						<tr>
							<td class="Label" align="right">
								Organization:&nbsp;</td>
							<td class="LabelWithBorder" colspan="3">
								<asp:Label ID="organization" runat="server"></asp:Label></td>
						</tr>
					</table>
					<table width="100%">
						<tr>
							<td align="right">
								<asp:Button ID="editSave" runat="server" Text="Edit" CssClass="Button" Width="90px"
									OnClick="OnEditSave"></asp:Button></td>
						</tr>
					</table>
					<table width="100%" cellspacing="0">
						<tr>
							<td>
								&nbsp;<asp:Label ID="moduleRolesLabel" runat="server">Module Roles</asp:Label></td>
						</tr>
						<tr>
							<td style="width:100%">
								<asp:DataGrid ID="moduleRoleDataGrid" runat="server" AutoGenerateColumns="False"
									CssClass="DataGrid" OnItemDataBound="OnModuleRolesItemDataBound" Width="100%">
									<AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
									<ItemStyle CssClass="DataGridItem"></ItemStyle>
									<HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
									<Columns>
										<asp:BoundColumn DataField="BitValue" Visible="False"></asp:BoundColumn>
										<asp:BoundColumn DataField="Module" HeaderText="Module"></asp:BoundColumn>
										<asp:BoundColumn DataField="Role" HeaderText="Role"></asp:BoundColumn>
										<asp:BoundColumn DataField="Description" HeaderText="Description"></asp:BoundColumn>
										<asp:TemplateColumn HeaderText="Selected">
											<ItemTemplate>
												<asp:CheckBox ID="isSelected" runat="server"></asp:CheckBox>
											</ItemTemplate>
										</asp:TemplateColumn>
									</Columns>
									<PagerStyle Visible="False"></PagerStyle>
								</asp:DataGrid></td>
						</tr>
						<tr>
							<td>
								&nbsp;<asp:Label ID="orgLabel" runat="server">Organizations</asp:Label></td>
						</tr>
						<tr>
							<td style="width:100%">
								<cc1:AccessPrivilegeEditor ID="orgAccessEditor" runat="server" AddButtonText="Add/Remove Organizations"
									OnAdd="OnAddOrganizations" OnProvideItemList="OnProvideOrgItemList" Width="100%" />
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;</td>
						</tr>
						<tr>
							<td>
								&nbsp;<asp:Label ID="portfolioLabel" runat="server">Portfolios</asp:Label></td>
						</tr>
						<tr>
							<td style="width:100%">
								<cc1:AccessPrivilegeEditor ID="portfolioAccessEditor" runat="server" AddButtonText="Add/Remove PI's"
									OnAdd="OnAddPortfolios" OnProvideItemList="OnProvidePortfolioItemList" Width="100%" />
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;</td>
						</tr>
						<tr>
							<td>
								&nbsp;<asp:Label ID="recordsLabel" runat="server">Records</asp:Label></td>
						</tr>
						<tr>
							<td style="width:100%">
								<cc1:AccessPrivilegeEditor ID="recordAccessEditor" runat="server" AddButtonText="Add/Remove Records"
									OnAdd="OnAddRecords" OnProvideItemList="OnProvideRecordItemList" Width="100%" />
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
